//
//  loginViewController.m
//  Life assistant
//
//  Created by HYMac on 16/2/25.
//  Copyright © 2016年 HY. All rights reserved.
//

#import "loginViewController.h"
#import "JDSideMenu.h"
#import "leftViewController.h"
#import "rightViewController.h"
@interface loginViewController ()<UITextFieldDelegate>

@property (weak, nonatomic) IBOutlet UITextField *username;
@property (weak, nonatomic) IBOutlet UITextField *password;

@end

@implementation loginViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
  
    
}

- (IBAction)regist:(id)sender
{
    UIAlertView *alert=[[UIAlertView alloc]initWithTitle:@"抱歉" message:@"本功能暂未开发，请稍等" delegate:nil cancelButtonTitle:@"返回" otherButtonTitles:@"确定", nil];
    [alert show];
}

- (IBAction)login:(id)sender
{
//    if ([self.username.text isEqual:@"HY"]&&[self.password.text isEqual:@"abc1510360132"])
//    {
            UIViewController *leftVC=[[leftViewController alloc]init];
            UIViewController *rightVC=[[rightViewController alloc]init];
            JDSideMenu *slide=[[JDSideMenu alloc]initWithContentController:rightVC menuController:leftVC];
            [slide setBackgroundImage:[UIImage imageNamed:@"menuwallpaper"]];
        [UIApplication sharedApplication].keyWindow.rootViewController=slide;
  //  }
}
- (BOOL)textFieldShouldReturn:(UITextField *)textField;
{
    [self.view endEditing:YES];
    return YES;
}
@end
